/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.p10.miage.gestionabsence.model;

import java.sql.ResultSet;
import java.sql.SQLException;


/**
 *
 * @author Sofian Seid
 */
public class Etudiant extends Utilisateur {
    
    private int id;
    private int promotionId;
    private String windowsId;

    public Etudiant() {
        super();
    }
    
    public Etudiant(ResultSet resultat) throws SQLException {
        this.init(resultat);
    }
    
    public Etudiant(int id, int promotionId, String nom, String prenom, String mail, String passwd,String windowsId) {
        super(nom, prenom, mail, passwd);
        this.id = id;
        this.promotionId = promotionId;
        this.windowsId = windowsId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPromotionId() {
        return promotionId;
    }

    public void setPromotionId(int promotionId) {
        this.promotionId = promotionId;
    }

    public String getWindowsId() {
        return windowsId;
    }

    public void setWindowsId(String windowsId) {
        this.windowsId = windowsId;
    }
  
    @Override
    public void init(ResultSet resultat) throws SQLException{
        super.init(resultat);
        this.id = resultat.getInt("ID");
        this.promotionId = resultat.getInt("PROMOTION_ID");
        this.windowsId = resultat.getString("WINDOWS_ID");
    }
}
